package com.dataart.training.crimequalification.service;

import com.dataart.training.crimequalification.dao.CrimeObjectDAO;
import com.dataart.training.crimequalification.entity.FacultativeCrimeObjectEntity;
import com.dataart.training.crimequalification.entity.MainCrimeObjectEntity;
import com.dataart.training.crimequalification.entity.SupplementaryCrimeObjectEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class CrimeObjectServiceImpl implements CrimeObjectService {

    //--------------------------------------------------------------

    @Autowired
    private CrimeObjectDAO crimeObjectDAO;

    //--------------------------------------------------------------

    @Override
    public List<MainCrimeObjectEntity> getAllMainCrimeObjects() {
        return crimeObjectDAO.getAllMainCrimeObjects();
    }

    @Override
    public List<FacultativeCrimeObjectEntity> getAllFacultativeCrimeObjects() {
        return crimeObjectDAO.getAllFacultativeCrimeObjects();
    }

    @Override
    public List<SupplementaryCrimeObjectEntity> getAllSupplementaryCrimeObjects() {
        return crimeObjectDAO.getAllSupplementaryCrimeObjects();
    }

    @Override
    public MainCrimeObjectEntity getMainCrimeObjectByCodename(String codename) {
        return crimeObjectDAO.getMainCrimeObjectByCodename(codename);
    }

    @Override
    public FacultativeCrimeObjectEntity getFacultativeCrimeObjectByCodename(String codename) {
        return crimeObjectDAO.getFacultativeCrimeObjectByCodename(codename);
    }

    @Override
    public SupplementaryCrimeObjectEntity getSupplementaryCrimeObjectByCodename(String codename) {
        return crimeObjectDAO.getSupplementaryCrimeObjectByCodename(codename);
    }
}
